import request from '@/utils/request'
// 获取轮播图信息
export function getCarousele(userId) {
  return request({
    'url': '/api/home/SelectCarousele?userId='+userId,
	header: {
				'content-type' :"application/x-www-form-urlencoded"
			}, 
    'method': 'get'
  })
}
// 获取通知信息SelectCarousele

export function getCurrNotice(userId) {
  return request({
    'url': '/api/home/SelectCurrNotice?userId='+userId,
	header: {
				'content-type' :"application/x-www-form-urlencoded"
			}, 
    'method': 'get'
  })
}

//获取所有谏言信息
export function getAllAdvice() {
  return request({
    'url': '/api/home/SelectAllAdvice',
    'method': 'get'
  })
}
//删除图片接口 
export function deleteImage(url) {
  return request({
    'url': '/api/oss/file/deleteImage?url='+url,
	header: {
				'content-type' :"application/x-www-form-urlencoded"
			}, 
    'method': 'put'
  })
}
//获取全局userid 
export function getUser() {
  return request({
    'url': '/api/home/getUser',
    'method': 'get'
  })
}
//获取我的谏言SelectmyAdvice
export function getMyAdvice(launchPartyId) {
  return request({
    'url': '/api/home/SelectmyAdvice?launchPartyId='+launchPartyId,
	header: {
				'content-type' :"application/x-www-form-urlencoded"
			}, 
    'method': 'get'
  })
}
//撤回谏言
export function RecalMyAdvice(adviceId) {
  return request({
    'url': '/api/home/DeletemyAdvice?adviceId='+adviceId,
	header: {
				'content-type' :"application/x-www-form-urlencoded"
			}, 
    'method': 'put'
  })
}
//查看自己可以进行谏言的等级
export function showAdviceHierarchy(userId) {
  return request({
    'url': '/api/home/showAdviceHierarchy?userId='+userId,
	header: {
				'content-type' :"application/x-www-form-urlencoded"
			}, 
    'method': 'put'
  })
}
//上传谏言 
export function SubmitAdvice(data) {
	return request({
		'url': '/api/home/SubmitAdvice',
		header: {
			'content-type' :"application/x-www-form-urlencoded"
		}, 
		'method': 'post',
		'data': data
	})
}
//修改未回复谏言

export function UpdatemyAdvice(data) {
	return request({
		'url': '/api/home/UpdatemyAdvice',
		header: {
			'content-type' :"application/x-www-form-urlencoded"
		}, 
		'method': 'put',
		'data': data
	})
}
//查看自己可以进行谏言的等级
export function SelectIfPays(userId) {
  return request({
    'url': '/api/home/SelectIfPays?userId='+userId,
	header: {
				'content-type' :"application/x-www-form-urlencoded"
			}, 
    'method': 'get'
  })
}
//缴费
export function MyPayTydue(userId) {
  return request({
    'url': '/api/home/MyPayTydue?userId='+userId,
	header: {
				'content-type' :"application/x-www-form-urlencoded"
			}, 
    'method': 'get'
  })
}